h1 ruBroker
p Welcome to ruBroker, a stock based game
p Time left
#timer
h3 Stocks

ul(data-bind='foreach: stocks, visible: stocks().length > 0')
  li
    |  Name:
    span(data-bind='text: name')
    |  Price:
    span(data-bind='text: price')
    input#text-input(type='text', data-bind='value: $parent.numBought')
    input#buy-button(type='button', data-bind='click: $parent.buyStock', value='Buy')
    span.up(data-bind='visible: priceChange() == 1') Price is going up
    pan.down(data-bind='visible: priceChange() == -1') Price is Going Down
| You have
b(data-bind='text: stocksOwned().length')  
|  stock type(s) and
b(data-bind='text: credit')
|  credit
span(data-bind='visible: stocksOwned().length == 0')  - it's time to start buying!
ul(data-bind='foreach: stocksOwned, visible: stocksOwned().length > 0')
  li
    | Name:
    span(data-bind='text: name')
    |  Price:
    span(data-bind='text: price')
    |  Amount:
    span(data-bind='text: numowned')
    |  Total:
    span(data-bind='text: total')
    input#text-input(type='text', data-bind='value: $parent.numSell')
    input#sell-button(type='button', data-bind='click: $parent.sellStock', value='Sell')
span(data-bind='visible: stocksOwned().length > 0') Sum total:
span(data-bind='text: sumTotal')
#winner
h3 Chat
#messages
  input#msg-input(type='text')
  input#send-button(type='button', value='Send')

script(type='text/javascript', src='/javascripts/chat.js')
script(type='text/javascript', src='/javascripts/rubroker.js')
script(type='text/javascript', src='/javascripts/timer.js')